<!--{include_page("page.html","top")}-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbborder">
	  <thead>
		  <tr>
			<th width="10%">订单号</th>
			<th width="40%">商品</th>
			<th width="20%">下单日期</th>
			<th width="10%">金额</th>
			<th width="10%">状态</th>
			<th width="10%">操作</th>
		  </tr>
	  </thead>
	  <tbody>
	  <!--{if $trades}-->
		  <!--{foreach $trades trade}-->
		  <tr id="tr_<!--{$trade.tradeid}-->"> 
			<td class="memberoper">
				<a href="<!--{url('index','mytrade','view','tradeid=$trade[tradeid]')}-->"><!--{$trade.tradeid}--></a>
			</td>
			<td class="mid">
				<!--{foreach $trade['order'] order}-->
				<a href="<!--{url('index','item','index','itemid=$order[itemid]')}-->" class="tradeimg" target="_blank">
					<img src="<!--{$order['itemimg']}-->_50x50.jpg" width="50" height="50"/>
				</a>
				<!--{/foreach}-->
			</td>
			<td><!--{date("m月d日 H:i",$trade[addtime])}--></td>
			<td>￥<!--{getPrice($trade['totalfee'])}--></td>
			<td><!--{getCommonCache('$trade[status]','tradestatus')}--></td>
			<td>
				<!--{if $type == "run"}-->
					<!--{if $trade['status'] == "WAIT_PAY"}-->
						<a href="javascript:void(0)" onclick="cancel('<!--{$trade[tradeid]}-->');return false;">取消订单</a> <br />
						<!--{if $trade['payment'] != 'cod'}-->
						<a href="<!--{url('index','payment','index','tradeid=$trade[tradeid]&code=$trade[payment]')}-->" target="_blank">立即支付</a>
						<!--{/if}-->
					<!--{else}-->
						不能操作
					<!--{/if}-->
				<!--{elseif $type == "finish"}-->
					<a href="<!--{url('index','aftersale','index','tradeid=$trade.tradeid')}-->">退换货</a>
				<!--{elseif $type == "cancel"}-->
					不能操作
				<!--{/if}-->
			</td>
		  </tr>
		  <!--{/foreach}-->
	<!--{else}-->
		<tr>
			<td colspan="6">对不起，没有找到相应信息的订单</td>
		</tr>
	<!--{/if}-->
	</tbody>
</table>
<!--{include_page("page.html","foot")}-->
